// 引入mongoose
const mongoose = require("mongoose");

// 连接数据库
mongoose
  .connect(
    "mongodb+srv://2048992672:gB4ndZgh8NVNPZoH@cluster0.ukhs7.mongodb.net/three-one"
  )
  .then(() => {
    console.log("数据库连接成功");
  })
  .catch((err) => {
    console.log("数据库连接失败111", err);
  });
let newLogin = new mongoose.Schema({
  name: String,
  title: String,
  time: String,
  email: String,
  address: String,
  phone: Number,
  sex: String,
  img: String,
  password: String,
});
let newLoginModel = mongoose.model("login", newLogin, "login");
module.exports = {
  newLoginModel,
};
